let Index = {
    init() {
        let that = this;
        this.charts = {};
        this.loadData();
        Public.chartsResize(this.charts)
    },
    loadData() {
        this.ec01_line_trend_d();//数据走势
        this.ec02_line_globe_d();//条形图
        // this.echart_map();//世界地图


    },
    ec01_line_trend_d() {
        let myChart = echarts.init($("#ec01_line_thecity")[0]);
        myChart.clear();
        myChart.setOption(com_line);
        myChart.setOption({
            legend: {
                show: true,
                x: 'center',
                y2: -5 * bodyScale,
                icon: "rect"
            },
            xAxis: {
                data: ['2000', '2001', '2002', '2003', '2004', '2005', '2006', '2007', '2008', '2009', '2010', '2011', '2012', '2013']
            },
            grid: {
                left: '5%',
                right: '3%',
                bottom: '22%'
            },
            series: [
                {
                    name: '出口额',
                    data: [5000, 5000, 6000, 5500, 5000, 10000, 15000, 20000, 25000, 30000, 30000, 35000, 40000, 45000]
                },
                {
                    name: '进口额',
                    data: [6000, 6500, 6000, 20000, 40000, 45000, 60000, 40000, 40000, 50000, 80000, 65000, 80000, 70000]
                },
                {
                    name: '进出口额',
                    data: [7000, 7000, 7000, 30000, 45000, 60000, 75000, 60000, 60000, 50000, 110000, 95000, 120000, 115000]
                },
            ].map(item => {
                return $.extend({}, com_lineSeries, item)
            })
        });
    },

    ec02_line_globe_d() {
        let myChart = echarts.init($("#ec02_line_thecity")[0]);
        this.charts.ec01_line_trend = myChart;
        myChart.setOption(com_line);
        myChart.setOption({
            legend: {
                show: true,
                x: 'center',
                y: 'bottom',
                icon: "rect",
                y2: -5 * bodyScale,
            },
            xAxis: {
                data: [2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013]
            },
            grid: {
                left: '5%',
                right: '3%',
                bottom: '31%'
            },
            series: [
               /* {
                    name: '俄罗斯',
                    data: [1860, 1887, 1990, 2387, 2281, 1843, 2259, 1858, 2240]
                },
                {
                    name: '蒙古',
                    data: [481, 1098, 943, 1383, 1552, 1370, 1485, 1564, 1337]
                },*/
                {
                    name: '哈萨克斯坦',
                    data: [997, 1170, 1327, 1009, 1249, 804, 1689, 762, 1164]
                },
                {
                    name: '吉尔吉斯斯坦',
                    data: [2678, 2551, 2513, 2380, 3034, 2610, 2603, 2367, 2904]

                },
                {
                    name: '塔吉克斯坦',
                    data: [2164, 2159, 2440, 2141, 3119, 3117, 2519, 2891, 2798]
                },
                {
                    name: '乌兹别克斯坦',
                    data: [4042, 4112, 4399, 4352, 4634, 4529, 4734, 4645, 4766]
                },
                {
                    name: '土库曼斯坦',
                    data: [2927, 3288, 2974, 2673, 2429, 2575, 2025, 1778, 1988]
                },
                /*{
                    name: '中国',
                    data: [5225, 5424, 5320, 5548, 5447, 5527, 5701, 5851, 5891]
                },*/
            ].map(item => {
                return $.extend({}, com_lineSeries, item)
            })
        });
    },
    echart_map() {
        let ec01_map = echarts.init($("#ec02_map_world")[0]);
        var option = {
            grid: {
                left: '3%',   //距离左边的距离
                right: '6%', //距离右边的距离
                bottom: '8%',//距离下边的距离
                top: 'auto' //距离上边的距离
            },

            visualMap: {
                show: true,
                min: 0,
                max: 1000000,
                //text:['High','Low'],
                realtime: false,
                calculable: true,
                color: ['orangered', 'yellow', 'lightskyblue'],

                right: '7%',//修改位置
                bottom: '10%',
                itemWidth: 10,//图形的宽度，即长条的宽度。
                itemHeight: 100,
                //配置属性 https://blog.csdn.net/u010682330/article/details/80702331
            },
            series: [
                {
                    name: 'World Population (2010)',
                    type: 'map',
                    mapType: 'world',
                    roam: true,
                    itemStyle: {
                        emphasis: {label: {show: true}}
                    },
                    data: [
                        {name: 'Afghanistan', value: 28397.812},
                        {name: 'Angola', value: 19549.124},
                        {name: 'Albania', value: 3150.143},
                        {name: 'United Arab Emirates', value: 8441.537},
                        {name: 'Armenia', value: 2963.496},
                        {name: 'French Southern and Antarctic Lands', value: 268.065},
                        {name: 'Australia', value: 22404.488},
                        {name: 'Austria', value: 8401.924},
                        {name: 'Azerbaijan', value: 9094.718},
                        {name: 'Burundi', value: 9232.753},
                        {name: 'Belgium', value: 10941.288},
                        {name: 'Benin', value: 9509.798},
                        {name: 'Burkina Faso', value: 15540.284},
                        {name: 'Bangladesh', value: 151125.475},
                        {name: 'Bulgaria', value: 7389.175},
                        {name: 'Bosnia and Herzegovina', value: 3845.929},
                        {name: 'Belarus', value: 9491.07},
                        {name: 'Bermuda', value: 64.951},
                        {name: 'Brunei', value: 27.223},
                        {name: 'Bhutan', value: 716.939},
                        {name: 'Botswana', value: 1969.341},
                        {name: 'Central African Republic', value: 4349.921},
                        {name: 'Switzerland', value: 7830.534},
                        {name: 'China', value: 1359821.465},
                        {name: 'Ivory Coast', value: 60508.978},
                        {name: 'Cameroon', value: 20624.343},
                        {name: 'Democratic Republic of the Congo', value: 62191.161},
                        {name: 'Republic of the Congo', value: 3573.024},
                        {name: 'Northern Cyprus', value: 1.468},
                        {name: 'Cyprus', value: 1103.685},
                        {name: 'Czech Republic', value: 10553.701},
                        {name: 'Germany', value: 83017.404},
                        {name: 'Djibouti', value: 834.036},
                        {name: 'Denmark', value: 5550.959},
                        {name: 'Algeria', value: 37062.82},
                        {name: 'Egypt', value: 78075.705},
                        {name: 'Eritrea', value: 5741.159},
                        {name: 'Spain', value: 46182.038},
                        {name: 'Estonia', value: 1298.533},
                        {name: 'Ethiopia', value: 87095.281},
                        {name: 'Finland', value: 5367.693},
                        {name: 'Fiji', value: 860.559},
                        {name: 'Gabon', value: 1556.222},
                        {name: 'United Kingdom', value: 62066.35},
                        {name: 'Georgia', value: 4388.674},
                        {name: 'Ghana', value: 24262.901},
                        {name: 'Guinea', value: 10876.033},
                        {name: 'Gambia', value: 1680.64},
                        {name: 'Guinea Bissau', value: 10876.033},
                        {name: 'Equatorial Guinea', value: 696.167},
                        {name: 'Greece', value: 11109.999},
                        {name: 'French Guiana', value: 231.169},
                        {name: 'Croatia', value: 4338.027},
                        {name: 'Hungary', value: 10014.633},
                        {name: 'Indonesia', value: 240676.485},
                        {name: 'India', value: 1205624.648},
                        {name: 'Ireland', value: 4467.561},
                        {name: 'Iran', value: 240676.485},
                        {name: 'Iraq', value: 30962.38},
                        {name: 'Israel', value: 7420.368},
                        {name: 'Italy', value: 60508.978},
                        {name: 'Jordan', value: 6454.554},
                        {name: 'Japan', value: 127352.833},
                        {name: 'Kazakhstan', value: 15921.127},
                        {name: 'Kenya', value: 40909.194},
                        {name: 'Kyrgyzstan', value: 5334.223},
                        {name: 'Cambodia', value: 14364.931},
                        {name: 'South Korea', value: 51452.352},
                        {name: 'Kosovo', value: 97.743},
                        {name: 'Kuwait', value: 2991.58},
                        {name: 'Laos', value: 6395.713},
                        {name: 'Lebanon', value: 4341.092},
                        {name: 'Liberia', value: 3957.99},
                        {name: 'Libya', value: 6040.612},
                        {name: 'Sri Lanka', value: 20758.779},
                        {name: 'Lesotho', value: 2008.921},
                        {name: 'Lithuania', value: 3068.457},
                        {name: 'Luxembourg', value: 507.885},
                        {name: 'Latvia', value: 2090.519},
                        {name: 'Morocco', value: 31642.36},
                        {name: 'Moldova', value: 103.619},
                        {name: 'Madagascar', value: 21079.532},
                        {name: 'Macedonia', value: 507.885},
                        {name: 'Mali', value: 13985.961},
                        {name: 'Myanmar', value: 51931.231},
                        {name: 'Montenegro', value: 620.078},
                        {name: 'Mongolia', value: 2712.738},
                        {name: 'Mozambique', value: 23967.265},
                        {name: 'Mauritania', value: 3609.42},
                        {name: 'Malawi', value: 15013.694},
                        {name: 'Malaysia', value: 28275.835},
                        {name: 'Namibia', value: 2178.967},
                        {name: 'New Caledonia', value: 246.379},
                        {name: 'Niger', value: 15893.746},
                        {name: 'Nigeria', value: 159707.78},
                        {name: 'Netherlands', value: 16615.243},
                        {name: 'Norway', value: 4891.251},
                        {name: 'Nepal', value: 26846.016},
                        {name: 'New Zealand', value: 4368.136},
                        {name: 'Oman', value: 2802.768},
                        {name: 'Pakistan', value: 173149.306},
                        {name: 'Philippines', value: 93444.322},
                        {name: 'Papua New Guinea', value: 6858.945},
                        {name: 'Poland', value: 38198.754},
                        {name: 'North Korea', value: 1.468},
                        {name: 'Portugal', value: 10589.792},
                        {name: 'Qatar', value: 1749.713},
                        {name: 'Romania', value: 21861.476},
                        {name: 'Russia', value: 21861.476},
                        {name: 'Rwanda', value: 10836.732},
                        {name: 'Western Sahara', value: 514.648},
                        {name: 'Saudi Arabia', value: 27258.387},
                        {name: 'Sudan', value: 35652.002},
                        {name: 'South Sudan', value: 9940.929},
                        {name: 'Senegal', value: 12950.564},
                        {name: 'Solomon Islands', value: 526.447},
                        {name: 'Sierra Leone', value: 5751.976},
                        {name: 'Somaliland', value: 9636.173},
                        {name: 'Somalia', value: 9636.173},
                        {name: 'Republic of Serbia', value: 3573.024},
                        {name: 'Slovakia', value: 5433.437},
                        {name: 'Slovenia', value: 2054.232},
                        {name: 'Sweden', value: 9382.297},
                        {name: 'Swaziland', value: 1193.148},
                        {name: 'Syria', value: 7830.534},
                        {name: 'Chad', value: 11720.781},
                        {name: 'Togo', value: 6306.014},
                        {name: 'Thailand', value: 66402.316},
                        {name: 'Tajikistan', value: 7627.326},
                        {name: 'Turkmenistan', value: 5041.995},
                        {name: 'East Timor', value: 10016.797},
                        {name: 'Tunisia', value: 10631.83},
                        {name: 'Turkey', value: 72137.546},
                        {name: 'United Republic of Tanzania', value: 44973.33},
                        {name: 'Uganda', value: 33987.213},
                        {name: 'Ukraine', value: 46050.22},
                        {name: 'Uzbekistan', value: 27769.27},
                        {name: 'Vietnam', value: 89047.397},
                        {name: 'Vanuatu', value: 236.299},
                        {name: 'West Bank', value: 13.565},
                        {name: 'Yemen', value: 22763.008},
                        {name: 'South Africa', value: 51452.352},
                        {name: 'Zambia', value: 13216.985},
                        {name: 'Zimbabwe', value: 13076.978}
                    ]
                }
            ]

        }
        ec01_map.setOption(option);
    }

};
Index.init();








